<?php
    session_start();
    require_once('userlevel.php'); //Require/include the permissions file
    require_once('template.php'); //Require/include the template file
    require_once('functions.php'); //Require/include the functions file
    require_once('db.php'); //Require/include the file with the database connection information
     
    if (!$_SESSION['user_loggedin']) {
        die ("Not logged in... <script>document.location.href='login.php'</script>");
    } elseif (!($_SESSION['userlevel'] >= $userlevel['main'])) {
        die (errorpage ("Your user level is not high enough to use this feature!", 'Tracked files'));
    } else {
        //Connect to to the database using values provided by db.php
        $db = new my_db;
         
        template_headtag('Home');
        template_header();
        template_left();

        echo "<div class='pageheadertext'>Home</div><br/>";
        echo "
        <!-- Start Editing here -->
        <div id='main'>
                
        <h4>Welcome</h4>
        <p>Thank you for using EightyThree.</p>
        <hr />
        <h4>Getting Started</h4>
        <p>
        You can view your all your tracked files <a href='tracking.php'>here</a>.<br />
        </p>

        <hr />
        <h4>Help</h4>
        <p>Q. How do I add a file?<br />
        You can add a file <a href='addfile.php'>here</a>.</p>
        
        <p>Q. When are more features coming?<br />
        We work, when we can on EightyThree. Do keep visiting our website for the latest. If you like EightyThree, buy us a beer!</p>
        <br />
        <p class='info'>You can edit this page by modifying 'main.php'. <br />
        Thank you for using EightyThree. Visit <a href='http://eightythree.arigel.com'>eightythree.arigel.com</a> for latest news.</p>

        
        </div>
        <!-- Stop Editing -->";
        template_footer();
    }
?>
